(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Rewrite Strategy: FULL

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

S is empty.
Rewrite Strategy: FULL

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
a__p, mark, a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(6) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
mark, a__p, a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Induction Base:
mark(gen_0':s:true:false:p:diff:leq:if2_0(0)) →RΩ(1)
0'

Induction Step:
mark(gen_0':s:true:false:p:diff:leq:if2_0(+(n4_0, 1))) →RΩ(1)
s(mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0))) →IH
s(gen_0':s:true:false:p:diff:leq:if2_0(c5_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__p, a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(10) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol a__p.

(11) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__leq, a__if

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Induction Base:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(0), gen_0':s:true:false:p:diff:leq:if2_0(0)) →RΩ(1)
true

Induction Step:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(+(n1449_0, 1)), gen_0':s:true:false:p:diff:leq:if2_0(+(n1449_0, 1))) →RΩ(1)
a__leq(mark(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)), mark(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0))) →LΩ(1 + n14490)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), mark(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0))) →LΩ(1 + n14490)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) →IH
true

We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).

(13) Complex Obligation (BEST)

(14) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__if, a__p, mark

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol a__if.

(16) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
mark, a__p

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(17) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2027_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2027_0), rt ∈ Ω(1 + n20270)

Induction Base:
mark(gen_0':s:true:false:p:diff:leq:if2_0(0)) →RΩ(1)
0'

Induction Step:
mark(gen_0':s:true:false:p:diff:leq:if2_0(+(n2027_0, 1))) →RΩ(1)
s(mark(gen_0':s:true:false:p:diff:leq:if2_0(n2027_0))) →IH
s(gen_0':s:true:false:p:diff:leq:if2_0(c2028_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(18) Complex Obligation (BEST)

(19) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2027_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2027_0), rt ∈ Ω(1 + n20270)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

The following defined symbols remain to be analysed:
a__p

They will be analysed ascendingly in the following order:
a__p = mark
a__p = a__leq
a__p = a__if
mark = a__leq
mark = a__if
a__leq = a__if

(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol a__p.

(21) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2027_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2027_0), rt ∈ Ω(1 + n20270)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(22) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

(23) BOUNDS(n^2, INF)

(24) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n2027_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n2027_0), rt ∈ Ω(1 + n20270)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

(26) BOUNDS(n^2, INF)

(27) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(28) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
a__leq(gen_0':s:true:false:p:diff:leq:if2_0(n1449_0), gen_0':s:true:false:p:diff:leq:if2_0(n1449_0)) → true, rt ∈ Ω(1 + n14490 + n144902)

(29) BOUNDS(n^2, INF)

(30) Obligation:

TRS:
Rules:
a__p(0') → 0'
a__p(s(X)) → mark(X)
a__leq(0', Y) → true
a__leq(s(X), 0') → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0', s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0') → 0'
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Types:
a__p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
0' :: 0':s:true:false:p:diff:leq:if
s :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
mark :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
true :: 0':s:true:false:p:diff:leq:if
false :: 0':s:true:false:p:diff:leq:if
a__if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
a__diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
diff :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
p :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
leq :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
if :: 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if → 0':s:true:false:p:diff:leq:if
hole_0':s:true:false:p:diff:leq:if1_0 :: 0':s:true:false:p:diff:leq:if
gen_0':s:true:false:p:diff:leq:if2_0 :: Nat → 0':s:true:false:p:diff:leq:if

Lemmas:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

Generator Equations:
gen_0':s:true:false:p:diff:leq:if2_0(0) ⇔ 0'
gen_0':s:true:false:p:diff:leq:if2_0(+(x, 1)) ⇔ s(gen_0':s:true:false:p:diff:leq:if2_0(x))

No more defined symbols left to analyse.

(31) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
mark(gen_0':s:true:false:p:diff:leq:if2_0(n4_0)) → gen_0':s:true:false:p:diff:leq:if2_0(n4_0), rt ∈ Ω(1 + n40)

(32) BOUNDS(n^1, INF)